package com.jungle.mogo.entity.pojo;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.IdTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author Jungle
 * @create 2024-05-21 17:13
 */
@EqualsAndHashCode(callSuper = true)
@Data
@CollectionName("user")
public class User extends BaseEntity {
    @ID(type = IdTypeEnum.ASSIGN_ID) //使用ID注解，标注此字段为MongoDB的_id，或者继承BaseModelID类
    private Long id;
    @CollectionField("nickname")
    private String name;
    private Long age;
    private String email;
}
